dofile("writer.lua")

function coordinates(x,y,z)
	if(x > 180 or x < -180) then error("longitude values be <180 ou >-180") end
	if(y > 90 or y < -90) then error("latitude values be <90 ou >-90") end
	return {name="coordinates", contents={tostring(x or 0)..","..tostring(y or 0)..","..tostring(z or 0)}}
end

function point(id,extrude,altitudeMode,coordinates)
	return {name = "Point" , attrs = {id ="\""..tostring(id).."\""},contents={extrude,altitudeMode,coordinates}}
end


